package Exercise;

import java.util.Scanner;

/**
 * Description：
 * Author: zhangc
 * Date：2017/8/10 19:17
 */
public class X2H {

    public static int getX(Long H) {
        int n = (int) Math.sqrt(H);
        if ((long)n * (n + 1) <= H)
            return n;
        n--;
        if ((long)n * (n + 1) < H)
            return n;
        return n;

    }


    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Long h = scanner.nextLong();
        int x = getX(h);
        System.out.println(x);
    }
}
